package com.cooper.scraper.show;

import com.cooper.android.comm.GalleryFlow;
import com.cooper.android.comm.Resource;
import com.cooper.scraper.R;

import android.content.Context;
import android.view.ViewGroup.LayoutParams;
import android.widget.Gallery;
import android.widget.RelativeLayout;

public class FlowGalleryViewShow<T extends Resource> extends
		GalleryFanartShow<T> {

	// private float fanartHieght;
	// private float fanartWidth;

	public FlowGalleryViewShow(Context context,
			FanartViewStrategy<T> fanartStrategy, int width, int height,
			float fanartScale, int watingImageRes) {
		super(context, fanartStrategy, new LightFanartImgStragety(fanartScale,
				1f, height), width, height, watingImageRes);

	}

	@Override
	public Gallery createAdapterView(Context context) {
		GalleryFlow gallery = new GalleryFlow(context);
		gallery.setBackgroundResource(R.drawable.showcase);
		gallery.setFadingEdgeLength(0);

		RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
				LayoutParams.MATCH_PARENT, galleryHeight);
		lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
		lp.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
		gallery.setLayoutParams(lp);
		return gallery;
	}

	// @Override
	// protected float getFanartWidth() {
	// return fanartWidth;
	// }
	//
	// @Override
	// protected float getFanartHeight() {
	// return fanartHieght;
	// }

}
